/**
 * Created by xjweng on 2017/1/4.
 */
var phonecatApp = angular.module('phonecatApp',['phoneList','phoneDetail','ngRoute','core']);
phonecatApp
/*.directive("phoneList",function () {
    return {
        restrict: 'E',
        scope: {},
        replace: true,
        template: ['<ul>',
                    '<li ng-repeat="phone in phones2">',
                        '<span>{{phone.name}}</span>',
                        '<p>{{phone.snippet}}</p>',
                    '</li>',
                    '</ul>'].join("\n"),
        link:function (scope) {
            scope.phones2 = [
                {
                    name: 'Nexus S',
                    snippet: 'Fast just got faster with Nexus S.'
                }, {
                    name: 'Motorola XOOM™ with Wi-Fi',
                    snippet: 'The Next, Next Generation tablet.'
                }, {
                    name: 'MOTOROLA XOOM™',
                    snippet: 'The Next, Next Generation tablet.'
                }
            ]
        }
    }
})*/
/**
 * 测试隔离scope，双向绑定
 */
    .directive("isolatedDirective", function () {
        return {
            restrict: 'E',
            scope: {
                name: "="
            },
            template: '<input ng-model="name">'
        }
    })
/*.controller("PhoneDetailController",["$routeParams",function ($scope,$routeParams) {
    $scope.phoneId = $routeParams.phoneId;
    console.log($routeParams);
}])*/
